package com.grm.workflow.service.impl;

import com.grm.workflow.mapper.WfCategoryMapper;
import com.grm.workflow.model.WfCategory;
import com.grm.workflow.request.WfCategoryQueryParam;
import com.grm.workflow.service.WfCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class WfCategoryServiceImpl implements WfCategoryService {
    @Autowired
    private WfCategoryMapper wfCategoryMapper;

    @Override
    public List<WfCategory> queryAll() {
        return wfCategoryMapper.queryAll();
    }

    @Override
    public List<WfCategory> querySelective(WfCategoryQueryParam queryParam) {
        return wfCategoryMapper.querySelective(queryParam);
    }

    @Override
    public void add(WfCategory wfCategory) {
        wfCategoryMapper.add(wfCategory);
    }

    @Override
    public void update(WfCategory wfCategory) {
        wfCategoryMapper.update(wfCategory);
    }

    @Override
    public void delete(List<Long> ids) {
        wfCategoryMapper.batchDelete(ids);
    }

    @Override
    public WfCategory queryByCode(String category) {
        return wfCategoryMapper.queryByCode(category);
    }
}
